BioDT - The Recreational Model

Author

Maddalena Tigli, Joe Marsh Rossney, Christopher Andrews

Published

June 1, 2025

1. Scope of the Model

The recreational potential model (RP Model) was developed as part of the Cultural Ecosystem Services prototype Digital Twin (CES-pDT) workpackage within the BioDT project. The (CES-pDT) has two independent core models:

  • the Biodiversity model (developed by Simon Rolph and Dylan Carbone, UK Centre for Ecology & Hydrology, Wallingford, United Kingdom): aims at estimating biodiversity levels across mammals, birds, plant and insects.

  • the Recreational Potential model (developed by Jan Dick, Chris Andrews, Maddalena Tigli, Megan Williams and Joe Marsh Rossney, UK Centre for Ecology & Hydrology, Edinburgh, United Kingdom): aims at estimating the landscapes’ capacity to provide opportunities for outdoor recreation based on varying user interests.

This report specifically documents the Recreational Potential (RP) Model, detailing its methodology, data sources, operational mechanisms, and outlining areas for future refinement and development.

CHRISTOPHER TO ADD MORE INFO? MAYBE THERE ARE SOME LIT SOURCES USED?

2. The model

2.1. Model description

flowchart LR
 subgraph s1["compute recreational potential"]
        C[("cropping of the 4<br>components file to the<br>extent of interest")]
        E["Compute each component's<br>contribution"]
        F["Rescale to unit interval"]
  end
    A("Definition of the<br><i>persona preferences</i>") ---> E
    B("Definition of the<br><i>area of interest</i>") --> C
    C --> E
    E --> F
    F --> G["recreational potential spatRast"]
    style s1 fill:#FFF9C4
    style A color:#000000
    style B color:#000000
    style C color:#000000
    style E color:#000000
    style F color:#000000
    style G color:#000000

The Recreational Potential (RP) Model estimates the recreational value of landscapes using four key components, each represented by a raster file:

  1. Landscape Component (SLSRA.tif)

  2. Natural Features Component (FIPS_N.tif)

  3. Infrastructure Component (FIPS_I.tif)

  4. Water Component (Water.tif)

Each of the four component raster files contains multiple layers, with each layer representing a specific feature. Each raster covers the entire domain of the model (with a 20mx20m resolution), currently Scotland (see 2.3. The underlying data).

The values in these raster layers range from 0 to 1, interpreted as follows:

  • 1 indicates that the feature is present in that cell.

  • 0 or NAs indicates that the feature is absent from that cell

  • Values between 0 and 1 are present in the features/layers of the Infrastructure and Water components rasters, and reflect the proximity from nearby features. This continuous scale allows the RP model to incorporate how areas near e.g., a loch, can still contribute to the recreational potential, even if they do not directly contain the feature

The four rasters form the basis for calculating the Recreational Potential (RP) across the landscape.

To run the RP model the user must define:

  • Area of interest: defined using a bounding box (terra::ext() in R).

  • Persona preferences: a CSV file assigning a score (0–10) to each of the 87 features (see 2.3. The underlying data), reflecting the persona’s interest in each (see example persona file “presets.csv” ).

RP model processing steps

  1. Cropping the raster files

The model first crops each of the four component rasters to the specified area of interest. Using the terra package in R, the bounding box is converted to a vector polygon with terra::vect(), and then used to crop the raster via terra::crop().

  1. Calculating each components contribution

For each cell (20m x 20m), the model extracts values from all relevant layers (features), multiplies them by the corresponding persona score, and computes a weighted sum across layers. This results in one new raster per component that reflects the component’s contribution based on the persona preferences.

  1. Re-scale to unit interval

Each of the components contribution rasters is re-scaled using “min-max normalization”:

\[ scaled.value = (x-min)/mix-min \]

Minimum values are mapped as 0, maximum values are mapped as 1, and all the intermediate values are proportionally scaled.

  1. Combining the components RP

The four normalized component rasters are summed cell by cell. The resulting raster is then re-scaled again (min-max normalization) to produce the final Recreational Potential raster.

The model’s output is a SpatRaster object (that can be saved as a .tif) with five layers:

  1. “SLSRA”: the RP of the landscape component

  2. “FIPS_N”: the RP of the natural features component

  3. “FIPS_I”: the RP of the infrastructure component

  4. “Water”: the RP of the water component

  5. “Recreational_Potential”: the combined RP

In all layers, values range from 0 to 1, where higher values (closer to 1) indicate greater recreational potential.

Because the model output is a result of the normalization of recreational potential of a specific area of interest, the values are relative within that area. This means that running the model with a different geographic extent will yield to different scores for the same features, even if the underlying data is unchanged.

2.2. Example run

We demonstrate the RP Model applied to the Bush Estate area (nearby Edinburgh) using two contrasting personas: a hard recreationalist and a soft recreationalist. The resulting maps illustrate how different preferences lead to different areas being highlighted for recreational value.

  1. Hard recreationalist exmaple

Here we show a model run the Bush Estate area using a “hard recreationalist” example of persona (saved as “Hard_Recreationalist” in “presets.csv” ). Key features preferences for this persona are:

Features scored the highest and the lowest in the hard recreationalist persona
score_group features
highest scores (scored 10 or 9) Rock Walls (FIPS_N), Mountains (FIPS_N), Inland cliffs, rock pavements and outcrops (SLSRA), Rock cliffs, ledges and shores (SLSRA), National Park (SLSRA)
lowest scores (scored 0 or 1) Built-up areas (FIPS_N), Flood plain (FIPS_N), Depressions (FIPS_N), No slope (FIPS_N), Gentle slope (FIPS_N), Country Park (SLSRA), Raised and blanket bog (SLSRA), Valley mires, poor fens and transition mires (SLSRA), Windthrown woodland (SLSRA), Woodland fringes and clearings and tall forb stands (SLSRA), Bare field or exposed soil (SLSRA), Built-up area (SLSRA), Royal Society for the Protection of Birds (RSPB) Reserve (SLSRA), Pond (Water), Motorway (FIPS_I), A Road (FIPS_I), B Road (FIPS_I), Minor or local road (FIPS_I), Access roads or Track (FIPS_I), Saltings (FIPS_N)

This persona highly values remote, challenging environments and avoids built-up or highly managed areas.

  1. Soft recreationalist example

Here we show a model run the Bush Estate area using a “soft recreationalist” example of persona (saved as “Soft_Recreationalist” in “presets.csv”). Key features preferences for this persona are:

Features scored the highest and the lowest in the soft recreationalist persona
score_group features
highest scores (scored 10 or 9) Traffic Free: Paved Surface (FIPS_I), Coastal dunes and sandy shore (SLSRA), National Park (SLSRA), Major Lochs (Water), Beaches or Dunes (FIPS_N), No slope (FIPS_N), Freshwater (SLSRA), Mixed deciduous and coniferous woodland (SLSRA), Scots pine woodland (SLSRA), Broadleaved deciduous woodland (SLSRA)
lowest scores (scored 0 or 1) Rock Walls (FIPS_N), Built-up areas (FIPS_N), Rocks or Scree (FIPS_N), Depressions (FIPS_N), Extremely steep slope (FIPS_N), Screes (SLSRA), Windthrown woodland (SLSRA), Bare field or exposed soil (SLSRA), Unnamed minor stream or tributary (Water), Motorway (FIPS_I), A Road (FIPS_I), Saltings (FIPS_N)

Soft recreationalists are drawn to tranquil, accessible landscapes and natural water features, avoiding steep or harsh terrain.

2.3. The underlying data

The methodology used to create each of the four components’ Scotland wide raster file is described in detail in this section.

An overview of the raster files of all four component for the Easter Bush area (the same extent displayed in the example model run) is also displayed.

Description of the 4 components’ raster files.
name raster description
SLSRA.tif

Landscape component

This includes data on land cover type, landscape designations and conservation, and farmland of high nature value.

resolution: 20x20
extent: whole of Scotland
crs: British National Grid
nr. features (layers): 40

FIPS_N.tif

Natural Features component

This includes data on land form types, soil types and slope.

resolution: 20x20
extent: whole of Scotland
crs: British National Grid
nr. features (layers): 24

Water.tif

Water component

This includes data on water feature types, as the presence of a lake or river.

resolution: 20x20
extent: whole of Scotland
crs: British National Grid
nr. features (layers): 13

FIPS_I.tif

Infrastructure component

This includes data on road and track, footpaths and cycle networks.


resolution: 20x20
extent: whole of Scotland
crs: British National Grid
nr. features (layers): 10

  1. Landscape component

CHRISTOPHER TO PROVIDE INFO ON THIS RASTRE FILE

Landscape component features
nr Name Description
1 SLSRA_CP_2 Country Park
2 SLSRA_HNV_2 Designated High Nature Value (HNV) farmland
3 SLSRA_LCM_1 Alpine and subalpine grassland
4 SLSRA_LCM_2 Arable land and market gardens
5 SLSRA_LCM_3 Arctic, alpine and subalpine scrub
6 SLSRA_LCM_4 Bare field or exposed soil
7 SLSRA_LCM_5 Base-rich fens and calcareous spring mires
8 SLSRA_LCM_6 Broadleaved deciduous woodland
9 SLSRA_LCM_7 Built-up area
10 SLSRA_LCM_8 Coastal dunes and sandy shore
11 SLSRA_LCM_9 Coastal shingle
12 SLSRA_LCM_10 Dry grassland
13 SLSRA_LCM_11 Freshwater
14 SLSRA_LCM_12 Inland cliffs, rock pavements and outcrops
15 SLSRA_LCM_13 Lines of trees, small planted woodlands, early-stage woodland and coppice
16 SLSRA_LCM_14 Littoral sediment or saltmarsh
17 SLSRA_LCM_15 Mesic grassland
18 SLSRA_LCM_16 Mixed deciduous and coniferous woodland
19 SLSRA_LCM_17 Non-native coniferous plantation
20 SLSRA_LCM_18 Raised and blanket bog
21 SLSRA_LCM_19 Riverine and fen scrubs
22 SLSRA_LCM_20 Rock cliffs, ledges and shores
23 SLSRA_LCM_21 Scots pine woodland
24 SLSRA_LCM_22 Screes
25 SLSRA_LCM_23 Seasonally wet and wet grassland
26 SLSRA_LCM_24 Temperate montane scrub
27 SLSRA_LCM_25 Temperate shrub heathland
28 SLSRA_LCM_26 Valley mires, poor fens and transition mires
29 SLSRA_LCM_27 Windthrown woodland
30 SLSRA_LCM_28 Woodland fringes and clearings and tall forb stands
31 SLSRA_NNR_2 National Nature Reserve (NNR)
32 SLSRA_NP_2 National Park
33 SLSRA_NR_2 Nature Reserve
34 SLSRA_RP_2 Regional Park
35 SLSRA_RSPB_2 Royal Society for the Protection of Birds (RSPB) Reserve
36 SLSRA_SAC_2 Special Area of Conservation (SAC)
37 SLSRA_SPA_2 Special Protection Area (SPA)
38 SLSRA_SSSI_2 Site of Special Scientific Interest (SSSI)
39 SLSRA_SWT_2 Scottish Wildlife Trust Reserve
40 SLSRA_WLA_2 Wild Land Areas
  1. Natural Features component

CHRISTOPHER TO PROVIDE INFO ON THIS RASTRE FILE

Natural Features component features
nr Name Description
1 FIPS_N_Landform_1 Foothills
2 FIPS_N_Landform_2 Mountains
3 FIPS_N_Landform_3 Terraces
4 FIPS_N_Landform_4 Flood plain
5 FIPS_N_Landform_5 Beaches or Dunes
6 FIPS_N_Landform_6 Rocks or Scree
7 FIPS_N_Landform_7 Depressions
8 FIPS_N_Landform_8 Hills
9 FIPS_N_Landform_9 Lowlands
10 FIPS_N_Landform_10 Rock Walls
11 FIPS_N_Landform_11 Uplands
12 FIPS_N_Landform_12 Valley sides
13 FIPS_N_Landform_13 Valley bottom
14 FIPS_N_Landform_14 Built-up areas
15 FIPS_N_Landform_15 Saltings
16 FIPS_N_Landform_16 Hummocks, mounds or moraines
17 FIPS_N_Slope_1 No slope
18 FIPS_N_Slope_2 Gentle slope
19 FIPS_N_Slope_3 Medium slope
20 FIPS_N_Slope_4 Steep slope
21 FIPS_N_Slope_5 Very steep slope
22 FIPS_N_Slope_6 Extremely steep slope
23 FIPS_N_Soil_1 Peat or Organic
24 FIPS_N_Soil_2 Mineral
  1. Infrastructure component
Infrastructure component features
nr Name Description
1 FIPS_I_LocalPathNetwork_2 Path
2 FIPS_I_RoadsTracks_4 Minor or local road
3 FIPS_I_RoadsTracks_2 A Road
4 FIPS_I_RoadsTracks_1 Motorway
5 FIPS_I_RoadsTracks_5 Access roads or Track
6 FIPS_I_RoadsTracks_3 B Road
7 FIPS_I_NationalCycleNetwork_1 On Road: Paved Surface
8 FIPS_I_NationalCycleNetwork_2 Traffic Free: Unpaved Surface
9 FIPS_I_NationalCycleNetwork_3 Traffic Free: Paved Surface
10 FIPS_I_NationalCycleNetwork_4 On Road: Unpaved Surface

The infrastructure component is derived from a raster indicating the presence or absence of infrastructure features. This original raster, labeled “original” in the Easter Bush example map, contains: 1 for cells where the feature is present, and 0 or NAs for cells where the feature is absent. CHRISTOPHER TO ADD WHERE THE ORIGINAL RASTER CAME FROM.

To account for proximity effects, the distance from each cell to the nearest infrastructure feature was calculated using the terra::distance() function in R. The resulting raster, labeled “distance” in the example map, contains the distance in meters from the center of each cell to the nearest feature.
Because this operation is memory-intensive at the national scale, the original Scotland-wide raster was divided into 20 spatial “windows”.To ensure accuracy near window boundaries, each window was processed with an additional 10 km buffer, allowing distances to be computed to features located in neighboring windows.

Finally, considering only the cells that were <= 500m distance from a feature (everything with features further away than that got assigned a NAs), the values were re-scaled from 0 to 1 (1 = present in cell, and then decreasing score as you get away from that cell). This raster is named “scored” in the example map, using the distance decay function JOE TO ADD PAPER FOR THIS FUNCTION + kappa and alpha values:

\[ distance (m) = \frac{\kappa + 1}{\kappa + \exp(\alpha x)} \]

Where kappa has a value of XX and alpha has a value of XX.

The “scored” raster is what it is utilized by the RP model.

  1. Water component

The water component is derived from a raster indicating the presence or absence of infrastructure features. This original raster, labeled “original” in the Easter Bush example map, contains: 1 for cells where the feature is present, and 0 or NAs for cells where the feature is absent. CHRISTOPHER TO ADD WHERE THE ORIGINAL RASTER CAME FROM.

Then, using the same methodology applied to the infrastructure component’s raster the “distance” and ”scored” raster were created.

The “scored” raster is what it is utilized by the RP model.

Water component features
nr Name Description
1 Water_Lakes_1 Pond
2 Water_Lakes_2 Lochan
3 Water_Lakes_3 Small Lochs
4 Water_Lakes_4 Medium Lochs
5 Water_Lakes_5 Large Lochs
6 Water_Lakes_6 Major Lochs
7 Water_Rivers_1 Minor river or tributary
8 Water_Rivers_2 Unnamed minor stream or tributary
9 Water_Rivers_3 Major river or tributary
10 Water_Rivers_4 Named minor stream or tributary
11 Water_Rivers_5 Lake
12 Water_Rivers_6 Tidal river or estuary
13 Water_Rivers_7 Canal

3. The Shiny app for the “watches” spin off

JOE TO ADD SECTION, MAYBE PROVIDE LINK?

4. Compertamentalization

JOE TO ADD SECTION, I HAVE NO IDEA WHAT WAS DONE HERE

5. Running the model for the whole of Scotland

MADDA TO ADD SECTION ONCE MODEL HAS RUN

6. Lessons learned

  1. Transitioning to terra::SpatRaster Improved Performance

One of the most significant improvements came from switching from the legacy raster::Raster to the more modern and efficient terra::SpatRaster format. This change brought several key benefits:

  • Faster processing of raster operations such as cropping, masking, and mathematical transformations.

  • Better memory management, particularly for large datasets covering all of Scotland with a high resolutions.

  • Improved integration with spatial vector formats and compatibility with modern spatial workflows in R.

Overall, the use of the package terra reduced computational overhead significantly (see report “Optimizing BioDT Recreational Potential (RT) model run-time”).

  1. Pre-processing at the National Scale Greatly Reduces Run-time

Pre-processing component rasters at the national (Scotland-wide) scale, rather than performing these operations at run-time for each user-defined area. Pre-processing included:

  • Standardizing spatial properties (extent, resolution, projection) across all four component rasters to ensure seamless overlay and computation.

  • Pre-computing distance rasters, to avoid repeated and costly distance calculations during model runs.

  • Pre-calculating scored rasters using predefined thresholds and decay functions, making them immediately usable for user-defined queries.

Overall, the use of this approach has reduced computational overhead significantly (see report “Optimizing BioDT Recreational Potential (RT) model run-time”).

  1. JOE to add lessons on shiny/compartmentalization if any
  2. CHRIS to add any other lessons if he has any

6. Future improvements

As the RP Model was developed as a prototype, several enhancements could improve its usability, accuracy, and performance. The following areas have been identified for future development:

  1. Simplifying feature scoring

    Currently, the model requires users to score 87 individual features across the four components. While this allows for a detailed definition of the “persona profile”, it can be time-consuming for users. A future version could:

    • Group similar features into broader thematic categories (e.g., “mountain terrain,” “urban infrastructure,” “wetlands”), allowing users to score these aggregated categories rather than individual layers, making the scoring process more intuitive and efficient

    • Maintain the option to score each of the 87 featre for expert users who want fine control

    A simpler model configuration could make the model accessible to more users.

  2. Connecting to Live, regularly updated data-sets

    Currently the model relies on static raster layers to represents the components, which may become outdated as landscapes change or as better data becomes available. A future version of the model could:

    • Link the model to live/regularly updated data-sets
    • Automatically generate the “original” raster layers for each component when updated data becomes available
  3. User-defined weighting components

    Currently the RP model assumes that all four components contribute equally to the Recreational Potential score. However, not all personas may value these components equally. A future version of the model could:

    • Allow users to specify custom weights for each of the four components (e.g. ,50% landscape, 20% water, 15% infrastructure and 15% natural features)
  4. Expanding the number of Persona presets available

    To make the RP model more accessible to casual non-technical users, and to encourage exploration and experimentation with it, a future version of the model could:

    • Provide persona preset for common user types (e.g., hikers, birdwatchers, families, cyclists etc.)
    • Define both features scores and components weights for each persona
  5. Include seasonal dynamics

    Currently, the RP model assumes a static Recreation Potential throughout the year, however, this can vary with seasons, and weather conditions. A future version of the model could:

    • integrate temporal layers by asking the persona to specify what season they are intending to recreate in. Then the model could have the underlying components starting values to have different values for different seasons, accounting for trail closures or flooding risks etc.)
  6. Allow for “future scenarios”

    With the aim of making the RP model the more relevant to policy makers and stakeholders, a future version of the model could:

    • have a “scenario analysis” mode, where users can “add” or “remove” values underlying components (e.g., to simulate a new trail or a new cycle path being added or the change of a landscape due to climate change or socio-economic changes)
    • allow for direct comparison on how the two (or more) scenarios differ (provide the user with a decrease or increase of Recreational Potential raster.
  7. JOE and CHRIS to add something if you have other ideas

References